GBML manual / Drawing

animation_current

The name of the animation this object is playing, like "walk", or an empty text if it is not playing one.

Works differently on Game Boy - Animations play as on the Advance, with smaller limits: a frame lasts up to 650 sixtieths of a second, a frame has at most 4 boxes of each kind, and a game has up to 255 animations.

Works differently on Game Boy Color - Animations play as on the Advance, with smaller limits: a frame lasts up to 650 sixtieths of a second, a frame has at most 4 boxes of each kind, and a game has up to 255 animations.

On other consoles this differs: see Side by side and How the consoles differ.

Syntax

animation_current() -> string

Returns

string

Description

The name of the animation this object is playing, like "walk", or an empty text if it is not playing one.

Example

if (animation_current() == "walk" && hsp == 0) {
    animation_play("idle");
}

Stands still when the object stops moving.

See also: Animationsanimation_playanimation_finished